﻿@model Prototipo.CMS.Models.Post
@{ 
    ViewBag.Title = "Novo";
}

@section head {
    <link href="@Url.Content("~/Scripts/CKEditor/contents.css")" rel="stylesheet" type="text/css" />
    
    <script src="@Url.Content("~/Scripts/CKEditor/ckeditor.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/CKEditor/config.js")" type="text/javascript"></script>
}

<h2>Novo post</h2>

@using (@Html.BeginForm()) {
    @Html.AntiForgeryToken()
    <p>
        @Html.LabelFor(x => x.Title)
        @Html.TextBoxFor(x => x.Title)
        @Html.ValidationMessageFor(x => x.Title)
    </p>
    <p>
        @Html.LabelFor(x => x.Content)
        @Html.TextAreaFor(x => x.Content, new { @class = "ckeditor" })
        @Html.ValidationMessageFor(x => x.Content)
    </p>
    <p>
        @Html.LabelFor(x => x.Tags)
        @Html.TextBoxFor(x => x.Tags)
        <em>Separe por virgulas</em>
    </p>  
    <input type="submit" value="Salvar" /> 
}